/* 管理员布局全局样式 */
:root {
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 60px;
  --header-height: 60px;
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --secondary-color: #2c3e50;
  --text-color: #333;
  --text-light: #7f8c8d;
  --border-color: #e0e0e0;
  --bg-color: #f5f7fa;
  --sidebar-bg: #2c3e50;
  --sidebar-text: #ecf0f1;
  --sidebar-active: #3498db;
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* 侧边栏样式 */
.admin-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  z-index: 90;
  transition: all 0.3s ease;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.admin-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}

.sidebar-logo i {
  margin-right: 10px;
  font-size: 22px;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 顶部栏样式 */
.admin-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
  padding: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover {
  background-color: var(--bg-color);
}

.header-breadcrumb {
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin: 0 10px;
  color: var(--text-light);
}

.breadcrumb-item a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--primary-color);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-search {
  width: 280px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  padding: 8px 15px;
  border-radius: 20px;
}

.search-box i {
  color: var(--text-light);
  margin-right: 10px;
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
}

.header-notifications {
  position: relative;
}

.notification-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
  position: relative;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.notification-btn:hover {
  background-color: var(--bg-color);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #e74c3c;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.expanded {
    transform: translateX(0);
  }
  
  .header-search {
    display: none;
  }
}
